package de.szut.ita13sommerfeld.blockadventure.util;

public class Vector {
	
	public static float getDistance(float x1, float y1, float x2, float y2) {
		return (float)Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
	}
	
	public static boolean onSameLevel(float y1, float height1, float y2, float height2) {
		return y1 + height1 >= y2 && y1 < y2 + height2;
	}
	
	public static boolean isBehind(float x1, float x2, float width2) {
		return x1 > x2 + width2;
	}
}
